Displaying Runbook Results and Details
Overview
The {result} and {detail} tags are used to display automation execution results. Developers should keep in mind some considerations while designing wiki document pages. From a developer perspective, automation executes and the results of that execution get stored in and viewed in a Worksheet. From the end-user perspective, a wiki page or Runbook may not be accessible in the Resolve Actions Pro interface, and the end-user may not be familiar with the concept of Worksheets. The developer must decide how to display results to the end-user. See Real-time Model Results for a visual alternative to displaying execution results.
Also, when viewing Runbook and ActionTask results on a document page or Runbook, the results that get displayed are the most recent results retrieved from the Active Worksheet. If there is no Active Worksheet, then results are not available. While developing wiki document pages, helpful information on the {detail} and {result} tags is available in the Source Editor in Wiki Syntax Help. Standard "Result" and "Detail" sections can be added to a document page using the Page Builder.
The {result} Tag
The {result} tag gives the developer some control over the display of execution results to the user. Consider the following automation model. The automation has a few specific logic tasks that handle the looping in the sub-Runbook and do not return results relevant to the end-user.
Figure 28 – Expanded Automation Model
When the automation gets executed, the generated Worksheet will list the irrelevant results and can distract the user from the more important results.
Figure 29 – Sample Generated Worksheet at Execution
The {result} tag provides options over which results appear on the document page. For example, the following {result} code displays results for only the listed ActionTasks from the sample automation.
{result}
Ping Target
Make SSH Connection
Disk Space Check
Uptime Check
Top Check
Check NCO PA Status > nco_pa_status
Check ITNM Status > itnm_status
Initialize Log File Check > parse
path semicolon
Filter and Display Log Errors
Close SSH Connection
{result}
Figure 30 – Selected Results On The Document Page
Within the tags, the results that are important to the user are listed. The results generated by the tag look similar to those from the Worksheet, but are at a much higher level, showing only the task description, results summary, and condition. The developer must decide how to use the task condition to communicate meaning to the user:
- Green (good) indicates no user action is required.
- Red (critical) indicates that the task failed to execute properly.
- Yellow (warning) indicates that the task executed properly and that the results may require user action.
Each "Result" condition is underlined. When an end-user clicks a "Result" condition, a pop-up window displays the execution details for that task. Click a red (critical) or yellow (warning) condition to discover why the task failed to complete or what the errors might be. The results are determined by the Assessor. It is up to the Runbook developer to decide how the Assessor interprets the results and how those results are communicated to the user.
Displaying Results from Archived Worksheets
By default, the {result} tag does not display old automation results from archived Worksheets. A specific Actions Pro system property called "resultmacro.check.archive" controls whether archived Worksheets can be accessed with the {result} tag, and thus whether a wiki document page can display archived automation results directly on the screen.
Turning on the system property to allow the {result} tag to query archived Worksheet results in the Actions Pro database entails a performance cost, which is why the system property is set to false by default.
In the System Administration main menu, click on System Properties item to bring up the "System Properties List". Search for the property named resultmacro.check.archive
: if the property is set to true, then the {result} tag macro can query archived Worksheets for ActionTask results if none are found in the current active Worksheets saved in Elasticsearch. To switch the property value, to either "true" or "false", click the Edit icon and in the Edit System Property dialog, type in the desired value in the "Value" field. Archived Worksheet results are often displayed in document pages that are referenced via URL. If referencing an archived Worksheet, PROBLEMID is the only parameter a client can pass through the URL.
The {detail} Tag
Below the results section is content generated using detail tags. The {detail} tag enables placement of the Detail results from an ActionTask execution into the wiki page. The detailed results are set in the Assessor by using RESULT.detail = 'some string'
. The detail can be text, which makes the execution results conveniently available to the user, or it can be HTML that gets rendered in the wiki page. The {detail} tag gives the developer flexibility in deciding how to communicate information to the end-user. The implementation of the detail tag depends on the requirements of the project and the application of the tools available in Actions Pro.
Using task detail to output in HTML is an advanced technique that developers can use to create dynamic interfaces. For example, the detail of one task can output a form that enables data entry and execution of another automation. A wiki document page can be used as an interactive dashboard or homepage that controls a dynamic, multi-step process.
In the following example, the detail tag generates the HTML for a collapsible section of data (the detail results from the health check and the log file results tasks from the sample automation). Because the Runbook can be used to analyze multiple log files, generating the HTML was necessary to avoid cluttering the wiki page with raw data. The wiki code is:
{detail}
Executive Checks Summary
{detail}
<br/>
{detail}
Display Error Detail
{detail}
The "Display Error Detail" task generates the following HTML, which is placed in the detail:
The resulting detail in the wiki document page displays as: